package org.ddr.board.util;

import org.apache.log4j.Logger;
import org.ddr.board.BbsVO;
import org.ddr.board.dao.BbsAbstractExecutor;


public class EmpTest {
	public static void main(String[] args) throws Throwable{
		final Logger logger = Logger.getLogger(EmpTest.class);
		new BbsAbstractExecutor(){
			@Override
			protected void execute() throws Exception {
				StringBuilder sql = new StringBuilder();
				sql.append(" select bbsno, title, contents, read_count, write_date, modify_date, userid ");
				sql.append(" FROM TBL_BBS ");
				sql.append(" WHERE ROWNUM = 1 ");
				
				pstmt = con.prepareStatement(sql.toString());
				rs = pstmt.executeQuery();
				
				try {
					BbsVO vo  = (BbsVO)BeanGenerator.getBean(rs, "org.ddr.board.BbsVO");
					System.out.println(vo);
				} catch (Throwable e) {
					e.printStackTrace();
					throw new Exception(e.getMessage());
				}
			}
		}.doJob();
	}
}
